<template>
  <j-modal
    :title="title"
    :width="1200"
    :visible="visible"
    switchFullscreen
    @cancel="handleCancel"
    :footer="true"
    cancelText="关闭"
  >
    <a-table
      ref="table"
      bordered
      size="middle"
      rowKey="id"
      :columns="columns"
      :dataSource="dataSource"
      :pagination="ipagination"
      :loading="loading"
      :rowSelection="{
        selectedRowKeys: selectedRowKeys,
        onChange: onSelectChange,
      }"
    >
    <span slot="action" slot-scope="text, record">
      <a @click="audit(record)">审核</a>
    </span>
    </a-table>
      <detailModal ref="detailModal"  @ok="detailModal"></detailModal>
  </j-modal>
</template>

<script>
  import {JeecgListMixin} from '@/mixins/JeecgListMixin'
  import detailModal from '../modules/detailModal'
export default {
    mixins: [JeecgListMixin],
    components:{detailModal},
  data() {
    return {
      columns: [
        {
          title: "姓名",
          align: "center",
          dataIndex: "expertName",
          width: 100,
        },
        {
          title: "在线时间",
          align: "center",
          width: 80,
          dataIndex: "expertOnline",
          sorter: true,
        },
        {
          title: "擅长领域",
          align: "center",
          width: 100,
          dataIndex: "expertExcel",
        },
        {
          title: "手机号码",
          align: "center",
          width: 100,
          dataIndex: "expertPhone",
        },
        {
          title: "地址",
          align: "center",
          width: 80,
          dataIndex: "expertAddress",
        },
        {
          title: "操作",
          dataIndex: "action",
          scopedSlots: { customRender: "action" },
          align: "center",
          width: 170,
        },
      ],
      visible: false,
      title: "专家入驻审核",
      url: {
        list: "/expert/busExpertManagement/auditList",
      }
    };
  },
  methods: {
    handleCancel() {
      this.onloads()
      this.visible = false;
    },
    audit(record)
    {
      this.$refs.detailModal.detail(record)
     
    },
    detailModal(){
      this.loadData();
    },

    onloads(){
      console.log(1111,'111');
      this.$emit('load')
    }
  },
};
</script>

<style lang="less" scoped></style>
